﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace ReallyReallyReallySimpleRoguelikeData
{
    /// <summary>
    /// A class for reading text files.
    /// </summary>
    public static class TxtFileToString
    {
        /// <summary>
        /// A method that returns a string containing the contents of the file.
        /// </summary>
        /// <param name="filePath"></param>
        /// <returns>A string containing the contents of the file. </returns>
        public static string Read(string filePath)
        {
            //needs to be more robust.  Error handling etc.
            StreamReader streamReader = new StreamReader(filePath);
            string text = streamReader.ReadToEnd();
            streamReader.Close();

            return text;
        }
    }
}
